package com.cumt.threeway.application;

import android.app.Application;

import com.cumt.threeway.constant.ThreeWayConstant;
import com.cumt.threeway.table.ActivitiesEntity;
import com.cumt.threeway.util.ThreeWayData;

import java.io.File;

import cn.jpush.android.api.JPushInterface;
import cn.sharesdk.framework.ShareSDK;

/**
 * Created by Jingjing.Hu on 2016/4/1.
 */
public class ThreeWayApplication extends Application {
    private static final String TAG = "JPush";

    private ActivitiesEntity activitiesEntity;

    @Override
    public void onCreate() {
        super.onCreate();

        JPushInterface.setDebugMode(true); 	// 设置开启日志,发布时请关闭日志
        JPushInterface.init(this);     		// 初始化 JPush
        ShareSDK.initSDK(this);
        createFile();
        ThreeWayData.getInstance().init(this);
    }

    private void createFile() {
        File file = new File(ThreeWayConstant.PATH);
        if(!file.exists()) {
            file.mkdirs();
        }
    }

}
